//
//  DoctorApplyListModel.m
//  QuickCure1
//
//  Created by summer的Dad on 16/10/31.
//  Copyright © 2016年 maoge. All rights reserved.
//

#import "DoctorApplyListModel.h"
#import "NetWorkTool.h"
#import <YYModel.h>

@implementation DoctorApplyListModel
//打印
-(NSString *)description
{
    
    return [self yy_modelDescription];
    
}


//发送接收数据
+ (void)getListDataModelComplete:(void(^)(NSArray <DoctorApplyListModel *> *modelList, NSError *error))completeBlock
{
    //7.获取医生列表接口 OK
  
        
        //    {"ci1_id":1,"ci2_id":3,"ci3_id":3,"diagnosis_type":0,"page_size":15,"is_confirmed":1,"user_id":1000089, "page":1,"has_diagnosis":2}
        NSString *urlString = kMatchDoctors;
    
        NSDictionary *paramDic = @{@"ci1_id":@1,
                                   @"ci2_id":@3,
                                   @"ci3_id":@3,
                                   @"diagnosis_type":@0,
                                   @"page_size":@15,
                                   @"is_confirmed":@1,
                                   @"user_id":@1000089,
                                   @"page":@1,
                                   @"has_diagnosis":@2
                                   };
        
    [[NetWorkTool shareManager] POST_RequestWithUrlString:urlString parmas:paramDic successBloock:^(id responseObject) {
        NSArray* array = responseObject[@"data"];
        
        NSArray <DoctorApplyListModel *> *modelList = [NSArray yy_modelArrayWithClass:[DoctorApplyListModel class] json:array];
        
//        NSLog(@"%@", responseObject[@"data"]);
        if (completeBlock) {
            completeBlock(modelList, nil);
        }
        
    } failureBlock:^(NSError *error) {
        
        NSLog(@"error = %@",error);
    }];
    
    
////        [self loadUrl:urlString params:paramDic];
//   
//    [[NetWorkTool shareManager] GET_RequestWithUrlString:kMatchDoctors parmas:nil successBloock:^(id responseObject) {
//        NSLog(@"成功 %@",responseObject);
//    } failureBlock:^(NSError *error) {
//       
//        NSLog(@"失败");
//    }];
    
    
}

@end
